{extend name="common/base"}
{block name='title'}商品分类{/block}
{block name='body-type'}ad_index{/block}
{block name="content"}
        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title  am-cf">商品分类</div>
                            </div>
                            <div class="widget-body  am-fr">

                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                    <div class="am-form-group">
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <button type="button" class="am-btn am-btn-default am-btn-success" onclick="window.location.href='add'"><span class="am-icon-plus"></span> 新增</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="am-u-sm-12">
                                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " id="example-r">
                                        <thead>
                                            <tr>
                                                <th>分类id</th>
                                                <th>分类图</th>
                                                <th>分类名称</th>
                                                <th>分类级别</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody id="ajax-body">
                                            {volist name="fenlei_list" id='vo' key="k"}
                                            <tr class="gradeX">
                                                <td class="am-text-middle">{$k}</td>
                                                <td>
                                                    <img src="{$vo.src}" class="tpl-table-line-img" alt="" style="width: 100px;">
                                                </td>
                                                <td class="am-text-middle">{$vo.name}</td>
                                                <td class="am-text-middle">{$grade[$vo.grade]}</td>
                                                <td class="am-text-middle" style="width: 15%;">
                                                    <div class="tpl-table-black-operation">
                                                        <a href="{:Url('admin/fenlei/edit')}?id={$vo.id}">
                                                            <i class="am-icon-pencil"></i> 编辑
                                                        </a>
                                                        <a href="{:Url('admin/fenlei/delete')}?id={$vo.id}" class="tpl-table-black-operation-del">
                                                            <i class="am-icon-trash"></i> 删除
                                                        </a>
                                                    </div>
                                                </td>
                                            </tr>
                                            {/volist}
                                        </tbody>
                                    </table>
                                </div>
                                <div class="am-u-lg-12 am-cf">
                                    <div class="am-fr" id="ajax-page">
                                        {$page}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {/block}